wayland: Add private API to retrieve the drag window for a drag context
authorCarlos Garnacho <carlosg@gnome.org>
Thu, 28 Aug 2014 12:12:51 +0000 (14:12 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Mon, 1 Sep 2014 17:17:54 +0000 (19:17 +0200)
On wayland the DnD surface must be created early when starting the drag
operation, so offer API for GTK+ to get the GdkWindow used as a DnD
surface on the drag operation.

https://bugzilla.gnome.org/show_bug.cgi?id=697855

gdk/wayland/gdkdnd-wayland.c
gdk/wayland/gdkwaylandselection.h

index fef24c66784dc9798589d8865c0337aeec1fadf5..e68569ad15719aea8c1d3da30e0898ee80976dbb 100644 (file)
@@ -502,3 +502,12 @@ gdk_wayland_drag_context_undo_grab (GdkDragContext *context)
 
   _gdk_wayland_display_deliver_event (gdk_device_get_display (device), event);
 }
+
+GdkWindow *
+gdk_wayland_drag_context_get_dnd_window (GdkDragContext *context)
+{
+  GdkWaylandDragContext *wayland_context;
+
+  wayland_context = GDK_WAYLAND_DRAG_CONTEXT (context);
+  return wayland_context->dnd_window;
+}
index 90474c0305531c8974cc22ee8a5ecf75cb91783a..a9d42cc6c84e898b3a388ef14261c92f5a63df1a 100644 (file)
@@ -47,6 +47,10 @@ GDK_AVAILABLE_IN_ALL
 void
 gdk_wayland_selection_clear_targets (GdkAtom selection);
 
+#define gdk_wayland_drag_context_get_dnd_window gdk_wayland_drag_context_get_dnd_window_libgtk_only
+GDK_AVAILABLE_IN_ALL
+GdkWindow *
+gdk_wayland_drag_context_get_dnd_window (GdkDragContext *context);
 
 #endif